

public class CustomObjectA {

    private String name;

    static {
        System.out.println("执行静态A代码块");
    }

    public CustomObjectA() {
        this.name = new String();
        System.out.println("自定义对象正在创建");
    }

    public void test() {
        System.out.println("指定test代码块 name=" + name);
    }

}